package beans;

import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;

/**
 *
 * @author Meraner Marcel
 */
public abstract class DilateErodeFilterBeanBeanInfo extends SimpleBeanInfo {
    
    protected abstract Class<?> getBeanClass();
    
    @Override
    public PropertyDescriptor[] getPropertyDescriptors() {
        try {
            PropertyDescriptor enabled, matrixSize, matrixValue, matrixType;
            
            enabled = new PropertyDescriptor("filterEnabled", getBeanClass());
            enabled.setDisplayName("Set active:");
            
            matrixSize = new PropertyDescriptor("matrixSize", getBeanClass());
            matrixSize.setDisplayName("Matrix size:");
            
            matrixValue = new PropertyDescriptor("matrixValue", getBeanClass());
            matrixValue.setDisplayName("Matrix value:");
            
            
            PropertyDescriptor pd[] = { enabled, matrixSize, matrixValue };
            return pd;
        }
        catch(Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }
    
}
